Some performance updates

Rather use prototypes