Just reviewing the code, so far so good.
Some typos in the comment though.

"ignore urls to file extensions such as images etc"