Continued work on separating data and ui code.