Revert previous.
Flesh out matcher and getType method.
Gets a lot further before passing out.

Fixed typos in SQL and related, now there's an issue of
the wrong view id or something.