Can register hooks thanks to Python decorator; fixes #43
Using newly added Python decorator for hook registration