Added more unit tests to the ui component code.
Comments.
Finished unit testing the UiComponent.