refactore pages classes