Simplified serialization code