Cleaned up robot code.