Event plugin design. Closes #374.