fixed token replacement bug - in-place substitution modified the original paths/urls and prevented subsequent substitutions from working correctly. minor DRY-oriented refactoring
we're replacing url tokens now too
clarify the record filtering process