What do you think about separating MAPInference and MAPInferImpl into different files? I think it is a bit weird to put together the interface of MAPInference with the one of MAPInferImpl, since as an implementation class we would like to hide its details.