Updated the layout component and added tests