More simplifications by pattern matching