Attempt at data layer, doesn't work as yet