First working version for making dirty maps