Field class refactoring and tests.