Changes to adapt to the new CSPOM API