Added Parsing for prime checking and expansion.