Revisions to precache robot.  Added debug mode.