Code format
Refactor of repeated method
Extract Edges in HashMap for use in C
Test refactor for Edge HashMap