Bunch of changes..

- 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
More CS fixes.