Tweaked the sample application