refactor main_layout.erb