Removed excess imports, modified regex in compliance with fb mods, code tidy

Greetings,
I have make some modifications to re-enable this script to work again i think for a fist stage is functional,