Implement get_repo and minor tweaks on sync_repo