Do some cleanup.