some PHPDoc fixes in lib

and removed some unused imports also