Turn EGNode to be a nested class inside ElimGraph