Put functions in proper order.