Refactor, changed the regexp to make it compatible with the URL browser interface