Started some refactoring.
- Move the drawing work to a separate file.
- Store attributes to allow for command line options to specify attributes
  (eventually).
Random progress commit.