Remove deprecated references, correct bug in orderBy.