Changes to document and modify code based on coder and php_codesniffer suggestions