Improve documentation
Remove useless comment
Use match ... with instead |> function (more readable)