separated app view andstudio views controller code and put common functions on one place. Common in mockApp.js, and app in appCtrl.js and index in studioCtrl.js
added comments to all functions
fixed resizing bug