Fixed parenthesis matching in Algorithm.sort
Added test code for calling sort2