Lifestyle factors link to headaches