Remove unnecessary memory copying.
Add primesieve dependency.