Export to tab and to file done, some bugfixes