Various fixups. Restoring pane positions doesn't work quite yet.