Adding new source code for handling different types of fields.