reorder, refactor and document iio