Some cleanup in the sketch after code review.

This version of the code actually worked with the new iPhone App
controls. More work to do but good start.