added functionality to add events, fixed a couple minor bugs'