Dev/docs and validation
After the pareview.net review, some issues were raised about namespaces and docblocks. I have altered the code to make sure that each function/method is documented and that namespaces are not used outside of 'use' statements.