Adding functionality for makeCacheMatrix and cacheSolve