Minor fixes like not quoted variables and other stuff.

Tried to make the coding style more uniform.

Noticed while reading the code.