Splited the layout and templates