More tests, more fixes.