Added robot and refactored it to be more versatile