core.py: eliminate dependency on collections.Counter
core.py: added missing `import subprocess`
transient.py: drop dep. on importlib, use `__import__` directly