Moves a lot of the class methods in Repository into instance methods