Refactored fields method.

[ci skip]