split out the ui from the lib (bug 902946)