Split out the modifying section

Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Split out the rules themselves

Signed-off-by: Tom Haynes <loghyr@primarydata.com>