Move to_string and from_string to a single header