Revert "Attempt at optimizations"

This reverts commit 87761d5290a1785e0311d5155e7620b1b30fa6b4.