More work on main layout