Create some data structures

The number of arguments we were passing around was beginning to get ridiculous.
Instead, create a couple of data structures that represent the "problem" that
the caller can initialize, execute, and read the results from.