~ replaced segment constant numbers with Short.SIZE, Longs.BYTES etc.
~ fixed an issue which splits the segment too eagerly.