Add phpdoc, and also fix indentation and whitespace ;)