some more unit tests, and some new found things to fix...