minor fixes
draft of how to treat container "b"
fixed internal check
added difference_type
typecast fixes warnings
typecast fixes warnings

only set b to empty when on last entry