Edited skeleton functions to cache matrix and solve for inverse of matrix