reference for exporting tables
some stuff
some api fixes