Merging the newui branch as it is sort-of-stable now

It's not rock solid, but nearly feature complete.