[DemoApp] Code refactoring