lots of revamping of serialization and testing
unit tests