A little change I made with Phil at the university.

We add some simple phpdoc and review some part of the code.
index.php reformatted