Added events.

Still needs some work on the flow, etc.