some improvements in master->detail layout