Some small changes to implementation of viewer commands