moved the ui work out into its own library