Make data a structure

This is in prep for using persistent data.