Implementations of makeCacheMatrix and cacheSolve