refactor out more things to shared ui lib