Clean up `read_uint` as in PR #2 (thanks @jkozera)