Added Tristen's sort patch, my changes to initialization for
adaptive/generalized