PEP 8 fix
changed stop module to return integer to be more coherent with standard sys.exit()
Divide Event Handling to clarify what happen at any event