Refactoring and caching.