Refactor layout page using slim