Changes to a backtracking approach.