Use instancetype instead of id for instances