Refactored sorted? code up to 51/63 tests passing.