Consolidate some glue, ditch reliance on 'lsock'