Fixed bug in collision detection. Added handling for events. Created init.js file.