Allow more customization of the UI and allow portrait mode scanning.

There are a few more things that I want to fix and a few things that I haven't fully tested but this is a very workable version so I figured I would go ahead and make an initial PR to get some thoughts and opinions. It is a rather large set of changes, so it's better to get multiple eyes on this sort of thing.