Rework

Merges in most of David Stroud's redesign. Still has a number of tweaks and bugfixes that need to be finished.