Cleaned up code for page.c and page.h