Some cleanups

- pyflakes
- remove unused imports
- 'check' method doesn't exist anymore, so change to 'update'