better layout and RTTI and Max