panel control, and sorting out filenames