More unit tests - full roundtrip and minor refactorings