Updated spell code