Refactored extension management and made the manager a singleton.