Refactor fastq generator reader

Reduced duplicate code, still more refactoring to do with error handling.