Fixing repository. I think it was my local version that went wrong. Also
cleaned up some of the code and removed redundant methods.