factored out common application code into ApplicationBase and ShellApplication foundation classes