fixing results processing and a bit of map stuff