Refactored to replace Page with file type handlers