preview_mode cleanup
preview_mode: added spec, made settings and new file no longer trigger closePreview() and fixed some code review changes
preview_mode: removed debug behaviour
merged in preview_mode