make sure pre1,pre2, norm1,norm2 are correctly ordered
several improvements to scanviewer