Memory updates

two small changes that improve memory usage.

it's still leaky, though this reduced leakiness by about 50% on my dev machine (also runs a lot faster)