Add read byte test.
Greatly reduced the write and read functions length by adding third arg.
Test reordering.