Test code

Fixed the test suites.  Added tests for a scenario that is failing so I
won't forget to fix it later