Added event handlers to improve gameplay