Added PHPDoc comments for some functions