use takeWhile1 in a few places to take advantage of attoparsec