refactored gMap to a field;
formatted some bits of code for better looking