cleaning up core serialization helper functions