The show was produced by creator Aaron Ruben, "Andy Griffith Show" producer Sheldon Leonard (in partnership with Griffith), and Ronald Jacobs; it was co-produced by Bruce Bayley Johnson and Duke Vincent. Among the writers were Sam Bobrick, Harvey Miller, Aaron Ruben, Jack Elinson, and Bill Idelson; "Andy Griffith Show" writers Everett Greenbaum and Jim Fritzell also wrote episodes. Coby Ruskin was the primary director in the first four seasons, before John Rich took over the role for the fifth season; other directors included Gary Nelson, Peter Baldwin, and Alan Rafkin. Ruth Burch was in charge of the casting, and John Finger directed the cinematography. The theme song was composed by Earle Hagen, who also composed the themes for shows such as "The Andy Griffith Show", "The Dick Van Dyke Show", and "That Girl".