Fixing page layout support and cleanup