many changes to sample app, refs #164