Changed the container of edges for each point from ArrayList to HashMap.