Coding standards fixes.

Move class_exists() check after file docs.
Add space around ! in conditional.