Refactor sample app.

[#72723618] https://www.pivotaltracker.com/story/show/72723618

Signed-off-by: Madhura Bhave <mbhave@pivotal.io>