Correctly format table dumps
Correctly generate `defs` entries for statics

Fixes #1.