Minor - format code, PHP warnings.
Fixing - PHP warnings, format code.