Removing unnecessary conditions