Add helper functions for resolving type names and keep a lookup hash of all ids