Clean up of function order