Added comments and collate statements to AddCommand and SearchCommand.