Few minor improvements to Segment.js.