Fixed a few things
updated to use event handlers rather than .update() method