More refactoring and some OSDD tests.