fixed formating on SortService
fixed JSLint error with missing semicolons and variables declared inside loops