Refactored views to use the layout