Redesign of several UI classes, breaking various logic into a new module.