working on performance optimizations. (not quite there yet, this breaks some stuff)
done with attempt at improving performance. (didn't improve much...)