Replace hardcoded metadata with serialization