Pages Generator Improvements: Less stack depth