Add GUI class.

Added initial draft of GUI class. Changed some IO methods. Change from
IO:print() to IO:debug().