Cleaning some subrotuines