preview_mode: added spec, made settings and new file no longer trigger closePreview() and fixed some code review changes