#10: Added expression reordering functionality