Removing some options, and dealing with solutionStack in replace-environment