Moved events to actions
Added willTransition