* Make examples set control_flow in a more realistic way * Format
* changed i32 to CustomEvent enum * added a match case for custom event * minor cleanup * fixes #953