replication test split into three parts in order to improve test execution time. Random fixes and improvements.