Add datapipeline

Restructure into separate namespaces.
Add datapipeline functions.