Cleaning the functions' output