improved page factory