Refactored layout to use new flat ui