Rationalized previewing code