Data layer changed to work with an embedded db