Fix templates and layout a bit