Refactor the custom field controls and add more controls