Update queries, views, and tests for new data format

This closes #115.