Improve data service and tests