Implements makeCacheMatrix and cacheSolve