Created function printCurrentPageHeading()

Separate function for the page heading since it repeats. Simplifies printPrimes() method