Added clear functionality to viewer