renamed long_format variable to wide_format
issue #2, implemented writing of GRID command. fixed command ordering in FormatHandler.write_output() and some other stuff. Added CommandWriter class.