Fix bug with titles containing "/"
Also, add comments to help those reading the code.