linear_set: new simplifier and some refactoring