Revert "SoFunction optimization"

This reverts commit 530f37040586241fd2314a2223e003b3f6315e64.