- Refactored a bit.
- Improved for preview window.