Added initial support for dependent types.  The code is horrible and ugly
now; I need to refactor to something cleaner.