refactoring google maps