Added basic table writing (untested)