Ran code through code checker

Removed all errors reported by the Code checker module, excluding
third-party OAuth.php file.