Re-organized code.  Fully commented.  Ready for review.