Added PHPDoc and minor cosmetic stuff.