Major clean up of the file selector.