Add filetypes handling and various options