Moved middleware and service registration to the application folder.