more unit tests and bug fixes
more unit tests, less failing cases, and more bug fixes