Finished circle intersection code using references.