Implement the cacheSolve() function and add general comments