more cleanup & phpdoc