split generic and specific functionality in data provider. Almost ready to allow scripts to create custom dp