Finished refactoring MapView.js