moved data code out to separate module
Finished adding support the API and tests