Code cleanup in preparation for removal of windows forms.