Move event handlers to script from html.