First draft of the cleaning script