cleanup events directive move logic to calEvent