Refactored base and page files