Changed callback logic for collectTestParams , code cleanup