Huge performance increases

Added much more caching to the repositories
Fixed issues with listeners not being removed