1. A method for optimized loading of program data on a device, the method comprising: receiving a program comprising at least one program unit, said at least one program unit including at least one main program unit; obtaining a use graph of said program, said use graph comprising a plurality of nodes, each node representing one of said at least one program unit, said plurality of nodes further comprising a root node representing a main program unit if said program comprises one main program unit, said root node representing a parent node for each of a plurality of main program units if said program comprises a plurality of main program units; ordering said at least one program unit within said program to create an ordered program, said ordering based at least in part on a depth-first traversal of said use graph; and storing said ordered program.