Moved initialization logic to service creation

The initialization happened after the creation of the services, which meant services couldn't setup dependencies of services services depending on them.