Take HTML snippets out of PHP tags where possible (index.php)
Trim unused variable definitions
Introduce simple JavaScript i18n for essential components
Tidy some hangover in the JavaScript