Added package scanning to graph factory implementation