Automatically add repos, fix zap file handling

Hey,

I just realized that my yesterday's commit request wouldn't work as expected, so I rewrote some parts of the zapping handling mechanism; now this one should work better.