adds references to map and app in the map controller