Refactor fields into a Field class