Updated MazeFactory