Trying to implement half edge structure.