Improve UI view factory. Minor fixes.