Refactor Domain and Repositories to the UI