adding vars and support for layout links