Got door code working. Did memory optimization