Refactoring with thymeleaf layout