started work on command-line user interface; moved drawing code to a separate class and organized it into methods