Refactor the data abstractions. Not working yet.