Zone export

This creates a zone export button. It also fixes some small bugs along the way.