Switch version of when and rest to dev branches on server side.
Delete dead code: listFiles servlet. Also disable 'exec' servlet on cloudfoundry.
Move secret.json file out of the project dir where its less likely to be accidentally deleted or shared via git.
Cleanup some comments. Unused import.
Fix a few more cases of returning deferred instead of promise.