many small simplifications