Fix door drawing in fog (#72)

Plus some refactoring