dramatically clean up iio.c