Add Code Analysis ruleset + fix all warnings