Refactor out lots of state
Componentise more