Atomizing methods on google maps api and applying some corrections