Treating headaches and migraines