Removes unnecessary conditions