Move two functions into globals as they are benefitial in other tests aswell and probably later in the implementation too.