refactor some of the data interface into separate module `data.py`
update dependencies