moved kryo serialization code here behind interface
move serialization behind interface. added more testing for serialization, errors and edge cases with models to support the tests.