Added comments and mean vector framework, though not sure if got it
right. Changed some values and functions for computing inverse of matrix