Implementation of a directed Graph for establishing connections between objects