Remove redundant tests and clean up UILayoutView class