Fixed module import error in tools.py