add layout template, improve tests, add example pages