Updated tools.py, structure.py, #554