cleaner, smarter results sorting, thanks (again) to bpaf <3