Finalized the eventlistener.js file