Separate sample_page from generator
Several enhancements