Better wall logic