Code cleanup in progress. See below.

- Code cleanup: made PSR-2 compliant
- Comment fixes: proper PHP-documentor-like indentation
- Started refactoring the HTML+PHP mess, by splitting it up.
- Removed trailing ?>
- Converted to UTF-8