Added separate door detection. Further improvements to increase robustness.