HTML and whitespace fixes

Fix some broken tags and unescaped output. Also consistent whitespace.