Added a method to compute outside representations. Checked for the correctness of marginal computation.