More cleanup to use the new api code