Simplify read code a bit.