Update this code to use eraseFromParent where possible. Compute