refactoring: separate maze generator from rendering, no global objects