Add rules and connections