rewrote all the UI code again; added my own split-view state preservation