Refactor UI state getters.