Adding git repo syncing

Also some bug fixes