Implementation of makeCacheMatrix() and cacheSolve()