Refactored to fix CPD warnings (OVX-321)

Change-Id: I61dd4ab8328e00b1d5c9b1b8311550446f405505