added more internal code layout changes