Added Maze resizing logic.