Refactor FormWidget