Introduced FieldEncoder trait for enabling further optimization