Added unit tests
Moved all caching into impl packages