get rid of uses of register
add functions to purposefully leak a str object in case we want to use the underlying buffer directly without copying it