Remove useless rules.