Small tweaks to silence some warnings (EOF newlines and shadowed variables)