added basic tests for deepSortBy and fixed some bugs. Need to add better tests