Fixed bug with computation of average detection. Now will try to get conditionals done...