Fix merge problems

Replace reqResponse("app:projectDirectory") by screenCastcontroller.getProjectDirectory()
Remove extra declaration of onPreview
Fix bug due to previous merge

- replace reqResponse('app:projectDirectory') by screenCastcontroller.getProjectDirectory()
- remove extra declaration of onPreview