Finished refactoring of loading TUI from XML.