added comments

Started trying to add comments following the Wordpress PHP
Documentation Standards and the PHPDoc PSR-5 documents.

It’s a slow process but is making the code more approachable and
hopefully more maintainable.