remove weight from edge (unnecessary)
arrays of optional are stupid, use vector of unique ptr
optional references suck, unmanaged_ptr is cooler