Improving controller filters and adding sort clauses for some functions