Code refactoring / app selection tweaks