cleaned out unused code, added some more comments.
no functional changes.
Merge pull request #76 from kris-sum/master

cleaned out unused code, added some more comments.