Use the preview API
Merge branch 'master' into fe-first-version
remove unused api, made requirejs for preview and regular files.