rewrite in coffeescript; restructuring; added marker clustering