JajaScript optimisation : use navigable graph nodes insteaf of lists.