Refactor remove window into one lambda.

This way there are less functions overall in
the container classes.