Added a lot of PHPDoc comments.