Implementation of makeCacheMatrix and cacheSolve functions