Refactored the phpDoc to place grouped methods into packages

The packages have the same name as the file to make it easier to read
the generated phpdoc documentation.