added code to app.js, controller and config parts of Whistle.