* Move some repositories' operations to a standalone service package * improve code * remove unused codes * add rollback when fork failed * add repo when return