Added type inference.