Snapshot before major changes to ds.py