Improvment in master-detail handling. Removed prints.