Reuse Type parsing from GetReturnType, Fix parameter parsing.

Probably GetReturnType needs to be refactored into GetType here, but we will keep the name for the moment so that mereges are more likely to still work.