Cleanup mess in rules