refactor of RepoPages and tests