Fix issue #50: Add support for vertical grid display mode, improve how e...

...nums are defined, and how output modes are processed