added app argument parsing code to demoapp class