Code cleanup in viewbuilders