Added main.js. Takes care of event stuff