gmaps refactoring