Separate js from HTML. Fix infowindow functionality.