Move junk cleaning statements to a more logical location.