tidying up criteo code