fixed repository issue and some cleanup