More logging adjustments
Add TESTS for the context filter. Fix some pyflakes/pep8. Fix code/tests to pass