Added Editing

You can now edit events after adding.
Some clean up.
MInor fixes

Made modal title dynamic based on current function.