first round of clean-up for computing detection features..