Modified sample app to reflect recent API changes