Partial revert of "More optmizations"

Needs further testing