Support of segment-based tiers

Resolves  #179
Also fixes test errors