some refactoring

fixed a bug with door placement