Refactoring in View and Cache classes