It's alive.  It runs.  Committing this before I lose it. :)
Remove refresh interval logic - just do it every request.  Added some missing frees.
Free the cluster object as well.
Some debug message cleanup and general cleanup.
First part of cleaning up endpoint parsing.
Allocate from PHP rather than directly to better track memory usage.  Reparse endpoints every request to minimize convulted usage of globals.