file fields code cleanup