KDM review of correct_detect

Many changes to ts.manipulate.correct_detect
- Fix line length and misc style stuff
- Add docstring to track review