Add compatibility header to all samples
Remove unused import
Remove unused imports
Flake8 fixes