Working on separating out layout logic