A number of new patterns added + optimization.