PSR, PHPDoc

Format the code to respect PSR Standard ([PSR1](http://www.php-fig.org/psr/psr-1/) & [PSR2](http://www.php-fig.org/psr/psr-2/)). Also add some PHPDoc, and remove commented code.