Added barebones segment classes based on bregman code.