This version produces the tab-delimited file ready for consumption. Still requires cleaning up though.