Various cleanups
Various small cleanups
Enable C0303 and C0325, whitespace at end of line and unnecessary () after if checks
Various lint stuff
Merge remote-tracking branch 'origin/develop' into feature/cleanup

* origin/develop:
  Log exact write check error to log (debug)
  Catch SSL errors which probably relate to self-signed certificates
Merge pull request #2032 from jmullan/feature/cleanup

Fix some linting and other errors