First shot at porting the sample app.