Fix for compile
Refactor prime