Make use of inspect for event handler registration

#48