Fix the layout and add some basic templating