move extractStrings method into new module in lib/ directory

make it more easy to use from other parts of the code
move more code into extract library

simplify re-use for later features