Cleaned up api, made library more controllable by clients opening or creating gits