cleaning up the code a little bit to mesh with google API standards