Added onException event.

This allows user to decide what to do: log or crash. For example, crash
in dev, log in production.
Fit lines in smaller screens.
"Small" refactoring. :)