Refactoring. Add separate cache classes.