Simplify code at a few places

Remove some duplicate checks,
and unnecessary errors.
Why do we even scan here at all?