Improvements on the building of the adjacents map