Pattern generator improvements