Refactored CreateThng to use private helper methods

Created helper methods for serialization and deserialization.