HPCC-9556 Final cleanup and extra tests

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