Revert "Partial revert of "More optmizations""

This reverts commit e2e1b1335e8094883fa103ad1ae309109e7511b0.