Updated for latest Viewer library changes