Refactor of data.py into python package

Closes #485