centralized layer changes to update layer to utilize caching and remove duplicate code blocks.