move dependencies into replica, fix command copy