some fine-grade layout optimizations