Added layer click event. Refactored and exposed functions for closing
infowindows.