Added a check to see if the element already has a job for it scheduled
do not use the `g` flag on reusable regexp
Better url formatting code and logic
Added test to go with last changes