Refactored CustomViewer

- In-line with coding guidelines.
- Better readability and maintainability.
- Improved spelling.