more tests and reorganization