Tidied up code. Added config for HTML5 tidy

Closes: https://github.com/sysapps/runtime/issues/12