Refactoring

Refactored the get_page routine and renamed it to print_page