Early implementation of Segment JavaScript class.