Added UI and final tests - refactor