refactoring code to make get_map its own module and clean up views.py