Removed refreshText check.

Cleaning up comments and whitespaces and consolidating nested {.