Add rules and relays