Refactored a small part of default UI class.