Refactored data modules to work better

Refactored the calling conventions to work better with internal calls
for data.