Start fleshing out the core data stuff.

This is gonna be fun to debug.