folders and tray form code cleanup