Refactored Prime module
Refactored Prime module