Implements makeCacheMatrix() and cacheSolve()