More refactoring. You can now specify a path, id or page object