Code analysis enable and cleanup.

Add code analysis rules

remo redundant using, enable analysis, mark serializable on exceptions

Add code analysis rules

Remove dead API key