Replaces id with instancetype