Updated with latest Viewer template, and associated fixes