Bugzilla #48071: made the MinOptMax class immutable. Also, lots of clean ups and minor refactorings. Patch submitted by Alexander Kiel.