Some enhancement and fixes

Includes .mario’s DOMPurify to sanitise data before writing to DOM