Added calf detection and tuned parameters