Reduce code-duplication within read.c