Working export. Very dirty.