Extract User interface into its own source file.