Added one big 'execRule' function

One big function that handles both the 'scan' and 'process' stuff. Also
takes a function to execute on each iteration of either the dom or the
lines (I’m thinking we can use this for the inline-config object). It
made things more attached and dependent, but it’s making the rules a
lot cleaner.