Only extract requires a document
Remove unnecessary if statement
Rename match to path to align with nokogiri