Click-to-edit/add functionality.

I've updated the code to allow users to click on a date or an event to go to the create or edit page. I also did a small amount of refactoring - mainly to consolidate code into files.