Simplify schema field sorting logic