Cleaning up the viewer and pdfbug; fixes bugs in Stepper

Fixes:

- Cleanup of viewer and PDFBug
- Repeats in Stepper
- Limits amount of items in the arrays
- Limits amount of operators
- Properly activate Stepper tab, when pdfBug=Stepper