more tests, some internal changes