Adding events and other stuff for checking syntax and react to events