The Repository class is quite big, and could perhaps be refactored to become more manageable. --liw

I've merged changes to a replacement for the Repository class. done --liw