cleaned up a bunch of old code, trying to squeeze the last bit of memory efficiency out of my code