Added caching and repo serialization