Simplify the application service provider
 And it's still working ...
Use the container to get the app and db objects
Make the app object non static
Add a configuration service - and use it from both applications