Create first-run experience to initialize configuration file. Also a bit of refactoring.