several improvements to scanviewer -- still many bugs!