fix some code style

* Cleaned up switch statement in index.php.
* Fixed some ugly heredoc pieces, IDE messed syntax highlighting up.
* JSTXT indentation