Translated Instantiate Generic to the new AST. This includes various utilities and some assorted clean-up.