Use refs for centers and points.

Fixes #4.