Merged package util into core, general cleanup.
Introduced GrpLexAnsatz optimization.