Cleaned up, commented, added default page url hooks