Rework of sample_app