refactoring

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
checkpoint2

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
checkpoint3

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>