[dijkstra/javascript] Add comments and shorten function names