Fix: A Bunch of code cleanup to fix StyleCop reported issues
Feature: Improved logging of exceptions