Fix the order of candidates.
Enable case-insensitive flag.
Remove debug code.