refactored data storage into own process.

It became unwieldy to have the data in each object (either directly, or by reference).