Completed and tested Q/viewport tool