Hint from someone who has worked with code that generates maps from text: Make sure all the letters/numbers used are the same length, it helps greatly when you have a map that looks like this:
00000000000000000000000000
00011100011000000110001100
00011111111000000111111000
00000011111111000011000000
00000000111111111110000000
00000000000000000000000000
Instead of this: (same map, different characters.)
0WWWWWWWWWWWWWWWWWWWWWWWWW
WWW,,,WWW,,WWWWWW,,WWW,,WW
WWW,,,,,,,,WWWWWW,,,,,,WWW
WWWWWW,,,,,,,,WWWW,,WWWWWW
WWWWWWWW,,,,,,,,,,,WWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWW
See how you can make out the rooms and paths with the first one, were with the second one you can't make out how everything works?