Added method closestCommonAncestor for passing models.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>