Sort completion candidates
Minor fixes
Simplify checking for reflection warnings