many changes to sample app, refs #161