remove unused stuff

where "stuff" = imports, extensions, and commented-out code.
block, don't poll, while waiting for the lock