Consolidated some features into UiElement.