Cleaned code to initialize service locator aware classes.
- Configure Doctrine to initialize service locator aware entities on instantiation.
- Removed code duplication.