Updated PHPDoc and made sure code meets guidelines.