Added object pooling to reduce the amount of garbage generated by pathseeking.