Added history entry and optimized one case for popup.py rtool call