Basic, functional code, all test cases passing

This includes basic test cases as well as basic functional code.  All tests now passing.