Neater code for Tomato scanning