Some updates and fixes in cleaning rules

There are a few remaining fixes to do. Here I focused on the biggest files.