Performing more rigorous  simplification of max operations
(this is giving huge speed ups)