Cleanup and refactor form helpers