addressed https://github.com/kvz/phpjs/issues/138 and did some cleanup

Ok, here we are. See it in action over here: http://gw2.chillerlan.net/examples/gw2maps-prototype.html