Fix style issues in view factory