Refactor the function make_field.