Escape output to protect against certain XSS attacks
Extend CodeSniffer style guidelines
typos
Remove inline if statements
Corect coding conventions and improve documentation