Documented and refactored Node and Hyperedge classes