Eliminate unecessary operations