Code layout improvements