update the examples to use non-deprecated APIs
python 3 fixes (including tabs/spaces problems!)
lint
more lint