[fix] Pass the mode in to the discover function.
[fix] Pass the pagelet in to the write mode for extraction.
[fix] Use regular expressions for the replace so it replaces all the values.