Added sorters, tests and tips in comments