Break apart the masthead DOM manipulation into a factory to ensure best practice.