Completed InteractionMatrix - yet to be unit tested, added Factorial
utility