updating the debug output to remove the need for the os library. updating some of the comments to godoc format