PHPDocs and simple code cleanup

Added PHPDoc blocks and did VERY simple code cleanup
Removed stats.php