clean up

Cleaned up code, added some comments.  Ready for branching for size
manipulation.