Remove repeated computations