Added some degree of commenting to appropriate files

This reminds me that this is awfully written, and should not be used in a somewhat serious
production environment!