Add rules and routes