refactor some test classes and add implicit serialization tests