small modifications for replication with 4.10 and clean-up in shellscripts