Add docs for writing handler classes