Modifications to disp_tools.py