Almost code complete.  Ready for unit tests.