added tolerance parameter and stopped exporeting trailPoints and friends from the Prelude