Data source

Closes #522 and Closes #521