Cleaning up the functions.