More bugfixes and general UI work.