add warnings for invalid options in tokenlists

e.g. when option-looking things appear inside tokenlists but
they're not on the first line; also a few minor bug fixes