Implementation of makeCacheMatrix and cacheSolve, with comments