much more work

broken up into sub-files
added individual tests