Added typesafe parameterization for segments ctor

Well, the public interface anyways.