Refactor instantiate using TypeValue

Issue made.