Improvements to sample application