Finalized query export.

Fixes #58