Algebraic Twists Of Modular Forms And Sums Over Primes To Squarefree Moduli