WIP: migrate some code into AbstractData