Implements the makeCacheMatrix and cacheSolve functions