Some more optimizations stuff

Managed to get the stress test down to 17 seconds. Yay.