rm unused imports
drop obsolete form of sha1 module and use with-syntax for locks