Refactored, Added Edge Class