Fix a couple of PHPMD violations
Cleanup and documentation