split up smudge and clean into separate files