Clean up in robot code