Adding else block to cacheSolve function, for clarity. And adding more inline comments