Improvements to sample application.