Big refactor of NativeTypesMetadata