Added ServiceLocator to replace unnecessary singletons.