Refactored how page name is handled