merged wall update with some refactoring