Refactor auto-opening a single app

Preparation for #4
Allow users to set a default app

Finishes #4