Restructuring the functions.