Add an tutorial for writing event handlers

This could probably need some refining.