Updates to speed up twine and socket processing.