Clean up of rules