started refactor to seprate out UI