Added UIState class.