Cleaning and use of functions