Fixed class normaliser in TypeRef

Signed-off-by: Tom Wright <tom@inflatablecookie.com>
Fixed TypeRef factory

Signed-off-by: Tom Wright <tom@inflatablecookie.com>