Remove dead code
Remove unused globals
PHPDoc