Added segment creation helping functions from pre-existing buffers