Wip split dispatch

Make things easier to test and maintain by splitting the "do the things" code into two phases:

1. Inspect the input and state and decide which operation to perform; and
2. Perform operations.