Fix the blank line tests

It appears that with the current state of affairs the only lines that
were read as blanks were the ones with no blanks whatsoever.
Make the blank-related code more consistent
Make the reading loops more clear