These are each only used in one specific function, I think it'd be preferable to move them into those functions.