Separate rules from main