Removing duplicate data store code