Functionality for custom repository classes

Functionality for custom repository classes as mentioned by #43.