Remove unnecessary operations