Don't cheat from the first level, or you won't understand a thing.
map.placeObject(16, 12, 'exit');
Delete everything in the editable section. This removes the wall generation code.