cleaned up arduino code.