Refactored the Ansi-related saving routines into saveasansi.js
Refactored the XBin saving routines into saveasxbin.js
Refactored the PNG-exporting routines into exportpng.js.