Redid the implmentation of the service locator
Refactored the frontend code to use the service locator