changed redirected extraction to only check first line of text and replaced boost::regex with custom code
changed check for page/text beginnings/endings from regex to string methods