Refactored. Made class methods for MapViewController.