Simplify cleancode function