map rending to main view, setting up controller