Refactored MazeGenerator class
Some refactoring done