Avoided using solve by using an innermost visit
Started on splitting productions which have multiple sorts.