Implemented trailing underscore stripping for the new serialization framework.