#4 Code cleanup.
#4 Updated Unittest.
updated test cases to serialization