JavascriptEngine.RunString now catches Exception instead.
Added "Custom" method to Log.
Tidied some parts of code, and made events print to console if enabled.