Abstracted out the layout class functionality