Adding events, prettyprint option and usage examples