Separated the UI from the back end code by moving it to its own library.