Implemented export to DAT

Except that now the rendering sucks for some unexplained reason