Implemented check to see if new vertex was already traversed. Prevented backtracking.