Better sorting for auto-complete suggestions, remove unused code.