Do some code cleanup