less code for 'ignore' mode; fixed bug with not finding eof in 'ignore' mode