refactoring; some fixes and improvements to UIA unit tests