Revert "Futher optimizations"

This reverts commit cbaa9be3b2fe6718259e279cde2220f17a8fdabb.