added more tests in e/unit-tests.  Fixed bugs found