graphs, avl tree for improved nn search, and connection list prebuild