Refactoring extensions to remove them from global scope