Moved properties into classes, fixes #11.  Refactored the display method. Various other minor fixes.