Add cleaning functions to separate script