This merge replaces the outdated code in the master branch with Farid's version of the detection tool.