refactor and modernize door.py

mostly using pylint/pyflakes .. untested