Fixed up creation of app map to work with DI.