Ugly version of the code behind the Layout resource for the sold-start