Refactored to separate classes
cache