Merged Simon's changes. A lot of UI changes.