Move statements before `return`.
Remove dead code.

Fixes CID 993701.
Add missing comma.

Fixes CID 1192559.