Changed MapViewController functions to class methods. Fixed tests.