comments and minor changes

added most of the comments.  removed printf commands used for
debugging. made command line output look better.  broke everything.
fixed everything.