Added event listener and map initialization