slight memory optimizations
further memory footprint reduction, now down by ~35%