Use types to improve NodeLayout for programs
Merge branch 'master' into functions