Memory usage and also some clean-up.