Fixed headers management and added -a|--user-agent switch