Added some useful methods to the repository class