These really should be member functions of the struct, they don't need to be globally accessible as they're only used during initialization.