Slight regorganization and arduino code.