Programmatically creating the layout with the data