Update example app; small refactors