Fix some warnings and some errors.
Fix logic error.
Correct some issues with the pfConsole changes.
Merge pull request #307 from dpogue/clang-fixes

Fix some warnings and some errors.