Resolve #19. Still needs some work though.
Update Repository API.
Move most model related code into models.Repository class. A lot of features may be broken now.