Revert "Small optimizations"

This reverts commit 8e3d2988db6744685b5ebfdf384c1d13206239f8.