Simplify code for reading