Implemented .GS file import/export, fixed a few bugs