Simplify driver code.

From issue #4 by Ben Hoyt
After the simplification in the previous commit, some type specs can be
properly split to extensions and regexes.