Fix up indenting.  Add conditional checking for issue #2
Fixed up parsing for blank sort criteria to fix issue #3