reverted specific versions and removed duplicate code