Simplification of Expr

Successfully simplifies code as well as retrieves correct order in any sequence.