Fixing formatting and Code Analysis errors