Some generalizations of the code and lots of duplication. Tweaked some default settings. Ideally the settings would be in separate classes and we'd build generic widgets around those classes. As is the widgets define the settings.