1. A method for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the method comprising: recursively scanning through application code beginning at an application entrypoint to determine which methods may be called and the classes to which they correspond; storing identifiers corresponding to said methods which may be called, in a method usage map organized by classes; receiving a request for an application from a client; processing all application and library classes for the application specified by the request, removing unused methods from it as per said method usage map; and transmitting any remaining methods to the client.