XXX: various struct optimizations