Resolve type id in a function
Resolve type id in a function

Separate out the code that calculates the type_id of the class into its
own function that we can use to build a map of tpes to classes.

seanredmond/subjoin