restructured and refactored *
forked repository manager init