Extract helpers and finish analyze_requests