Implemented makeCacheMatrix and cacheSolve.