Function ordering based on usage